package com.lxw.hi_mvp_mvvm.scene3_mvvm_jectpack;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MediatorLiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.lxw.hi_mvp_mvvm.User;

/**
 * @authour
 * @function
 * @date 2021/4/16
 */
public class HomeViewModel extends ViewModel {

    public LiveData<User> getUserInfo() {
        MutableLiveData<User> liveData = new MediatorLiveData<>();
        User user = new User();
        user.nickName = "Name";
        user.address = "address";
        liveData.postValue(user);
        return liveData;
    }
} 
